Integrand size = 31, antiderivative size = 366 \[ \int \sec ^m(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\frac {b \left (b^2 B (2+m)+3 a A b (3+m)+2 a^2 B (4+m)\right ) \sec ^{1+m}(c+d x) \sin (c+d x)}{d (1+m) (3+m)}+\frac {b^2 (A b (3+m)+a B (5+m)) \sec ^{2+m}(c+d x) \sin (c+d x)}{d (2+m) (3+m)}+\frac {b B \sec ^{1+m}(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{d (3+m)}-\frac {\left (b^3 B m (2+m)+3 a A b^2 m (3+m)+3 a^2 b B m (3+m)+a^3 A \left (3+4 m+m^2\right )\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1-m}{2},\frac {3-m}{2},\cos ^2(c+d x)\right ) \sec ^{-1+m}(c+d x) \sin (c+d x)}{d (3+m) \left (1-m^2\right ) \sqrt {\sin ^2(c+d x)}}+\frac {\left (A b^3 (1+m)+3 a b^2 B (1+m)+3 a^2 A b (2+m)+a^3 B (2+m)\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-\frac {m}{2},\frac {2-m}{2},\cos ^2(c+d x)\right ) \sec ^m(c+d x) \sin (c+d x)}{d m (2+m) \sqrt {\sin ^2(c+d x)}} \]
[Out]
Time = 0.87 (sec) , antiderivative size = 366, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {4111, 4161, 4132, 3857, 2722, 4131} \[ \int \sec ^m(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\frac {b \sin (c+d x) \left (2 a^2 B (m+4)+3 a A b (m+3)+b^2 B (m+2)\right ) \sec ^{m+1}(c+d x)}{d (m+1) (m+3)}-\frac {\sin (c+d x) \left (a^3 A \left (m^2+4 m+3\right )+3 a^2 b B m (m+3)+3 a A b^2 m (m+3)+b^3 B m (m+2)\right ) \sec ^{m-1}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1-m}{2},\frac {3-m}{2},\cos ^2(c+d x)\right )}{d (m+3) \left (1-m^2\right ) \sqrt {\sin ^2(c+d x)}}+\frac {\sin (c+d x) \left (a^3 B (m+2)+3 a^2 A b (m+2)+3 a b^2 B (m+1)+A b^3 (m+1)\right ) \sec ^m(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-\frac {m}{2},\frac {2-m}{2},\cos ^2(c+d x)\right )}{d m (m+2) \sqrt {\sin ^2(c+d x)}}+\frac {b^2 \sin (c+d x) (a B (m+5)+A b (m+3)) \sec ^{m+2}(c+d x)}{d (m+2) (m+3)}+\frac {b B \sin (c+d x) \sec ^{m+1}(c+d x) (a+b \sec (c+d x))^2}{d (m+3)} \]
[In]
[Out]
Rule 2722
Rule 3857
Rule 4111
Rule 4131
Rule 4132
Rule 4161
Rubi steps \begin{align*} \text {integral}& = \frac {b B \sec ^{1+m}(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{d (3+m)}+\frac {\int \sec ^m(c+d x) (a+b \sec (c+d x)) \left (a (b B m+a A (3+m))+\left (b^2 B (2+m)+a (2 A b+a B) (3+m)\right ) \sec (c+d x)+b (A b (3+m)+a B (5+m)) \sec ^2(c+d x)\right ) \, dx}{3+m} \\ & = \frac {b^2 (A b (3+m)+a B (5+m)) \sec ^{2+m}(c+d x) \sin (c+d x)}{d (2+m) (3+m)}+\frac {b B \sec ^{1+m}(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{d (3+m)}+\frac {\int \sec ^m(c+d x) \left (a^2 (2+m) (b B m+a A (3+m))+(3+m) \left (A b^3 (1+m)+3 a b^2 B (1+m)+3 a^2 A b (2+m)+a^3 B (2+m)\right ) \sec (c+d x)+b (2+m) \left (b^2 B (2+m)+3 a A b (3+m)+2 a^2 B (4+m)\right ) \sec ^2(c+d x)\right ) \, dx}{6+5 m+m^2} \\ & = \frac {b^2 (A b (3+m)+a B (5+m)) \sec ^{2+m}(c+d x) \sin (c+d x)}{d (2+m) (3+m)}+\frac {b B \sec ^{1+m}(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{d (3+m)}+\frac {\int \sec ^m(c+d x) \left (a^2 (2+m) (b B m+a A (3+m))+b (2+m) \left (b^2 B (2+m)+3 a A b (3+m)+2 a^2 B (4+m)\right ) \sec ^2(c+d x)\right ) \, dx}{6+5 m+m^2}+\frac {\left ((3+m) \left (A b^3 (1+m)+3 a b^2 B (1+m)+3 a^2 A b (2+m)+a^3 B (2+m)\right )\right ) \int \sec ^{1+m}(c+d x) \, dx}{6+5 m+m^2} \\ & = \frac {b \left (b^2 B (2+m)+3 a A b (3+m)+2 a^2 B (4+m)\right ) \sec ^{1+m}(c+d x) \sin (c+d x)}{d (1+m) (3+m)}+\frac {b^2 (A b (3+m)+a B (5+m)) \sec ^{2+m}(c+d x) \sin (c+d x)}{d (2+m) (3+m)}+\frac {b B \sec ^{1+m}(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{d (3+m)}+\frac {\left (b^3 B m (2+m)+3 a A b^2 m (3+m)+3 a^2 b B m (3+m)+a^3 A \left (3+4 m+m^2\right )\right ) \int \sec ^m(c+d x) \, dx}{(1+m) (3+m)}+\frac {\left ((3+m) \left (A b^3 (1+m)+3 a b^2 B (1+m)+3 a^2 A b (2+m)+a^3 B (2+m)\right ) \cos ^m(c+d x) \sec ^m(c+d x)\right ) \int \cos ^{-1-m}(c+d x) \, dx}{6+5 m+m^2} \\ & = \frac {b \left (b^2 B (2+m)+3 a A b (3+m)+2 a^2 B (4+m)\right ) \sec ^{1+m}(c+d x) \sin (c+d x)}{d (1+m) (3+m)}+\frac {b^2 (A b (3+m)+a B (5+m)) \sec ^{2+m}(c+d x) \sin (c+d x)}{d (2+m) (3+m)}+\frac {b B \sec ^{1+m}(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{d (3+m)}+\frac {\left (A b^3 (1+m)+3 a b^2 B (1+m)+3 a^2 A b (2+m)+a^3 B (2+m)\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-\frac {m}{2},\frac {2-m}{2},\cos ^2(c+d x)\right ) \sec ^m(c+d x) \sin (c+d x)}{d m (2+m) \sqrt {\sin ^2(c+d x)}}+\frac {\left (\left (b^3 B m (2+m)+3 a A b^2 m (3+m)+3 a^2 b B m (3+m)+a^3 A \left (3+4 m+m^2\right )\right ) \cos ^m(c+d x) \sec ^m(c+d x)\right ) \int \cos ^{-m}(c+d x) \, dx}{(1+m) (3+m)} \\ & = \frac {b \left (b^2 B (2+m)+3 a A b (3+m)+2 a^2 B (4+m)\right ) \sec ^{1+m}(c+d x) \sin (c+d x)}{d (1+m) (3+m)}+\frac {b^2 (A b (3+m)+a B (5+m)) \sec ^{2+m}(c+d x) \sin (c+d x)}{d (2+m) (3+m)}+\frac {b B \sec ^{1+m}(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{d (3+m)}-\frac {\left (b^3 B m (2+m)+3 a A b^2 m (3+m)+3 a^2 b B m (3+m)+a^3 A \left (3+4 m+m^2\right )\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1-m}{2},\frac {3-m}{2},\cos ^2(c+d x)\right ) \sec ^{-1+m}(c+d x) \sin (c+d x)}{d (1-m) (1+m) (3+m) \sqrt {\sin ^2(c+d x)}}+\frac {\left (A b^3 (1+m)+3 a b^2 B (1+m)+3 a^2 A b (2+m)+a^3 B (2+m)\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-\frac {m}{2},\frac {2-m}{2},\cos ^2(c+d x)\right ) \sec ^m(c+d x) \sin (c+d x)}{d m (2+m) \sqrt {\sin ^2(c+d x)}} \\ \end{align*}
Time = 2.55 (sec) , antiderivative size = 307, normalized size of antiderivative = 0.84 \[ \int \sec ^m(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\frac {\csc (c+d x) \left (\frac {a^3 A \cos ^4(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m}{2},\frac {2+m}{2},\sec ^2(c+d x)\right )}{m}+\frac {a^2 (3 A b+a B) \cos ^3(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+m}{2},\frac {3+m}{2},\sec ^2(c+d x)\right )}{1+m}+b \left (\frac {3 a (A b+a B) \cos ^2(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+m}{2},\frac {4+m}{2},\sec ^2(c+d x)\right )}{2+m}+b \left (\frac {(A b+3 a B) \cos (c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3+m}{2},\frac {5+m}{2},\sec ^2(c+d x)\right )}{3+m}+\frac {b B \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {4+m}{2},\frac {6+m}{2},\sec ^2(c+d x)\right )}{4+m}\right )\right )\right ) \sec ^{-1+m}(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \sqrt {-\tan ^2(c+d x)}}{d (b+a \cos (c+d x))^3 (B+A \cos (c+d x))} \]
[In]
[Out]
\[\int \sec \left (d x +c \right )^{m} \left (a +b \sec \left (d x +c \right )\right )^{3} \left (A +B \sec \left (d x +c \right )\right )d x\]
[In]
[Out]
\[ \int \sec ^m(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\int { {\left (B \sec \left (d x + c\right ) + A\right )} {\left (b \sec \left (d x + c\right ) + a\right )}^{3} \sec \left (d x + c\right )^{m} \,d x } \]
[In]
[Out]
\[ \int \sec ^m(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\int \left (A + B \sec {\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right )^{3} \sec ^{m}{\left (c + d x \right )}\, dx \]
[In]
[Out]
\[ \int \sec ^m(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\int { {\left (B \sec \left (d x + c\right ) + A\right )} {\left (b \sec \left (d x + c\right ) + a\right )}^{3} \sec \left (d x + c\right )^{m} \,d x } \]
[In]
[Out]
\[ \int \sec ^m(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\int { {\left (B \sec \left (d x + c\right ) + A\right )} {\left (b \sec \left (d x + c\right ) + a\right )}^{3} \sec \left (d x + c\right )^{m} \,d x } \]
[In]
[Out]
Timed out. \[ \int \sec ^m(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)) \, dx=\int \left (A+\frac {B}{\cos \left (c+d\,x\right )}\right )\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^3\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^m \,d x \]
[In]
[Out]